﻿<%
Dim HU_logintime,KEYid,keyuser,key,keyids,admin_login

if Admin_Ip="" Then Admin_Ip=getIP()
admin_login=wapadmin&"/login.asp"
sid=getFilter("sid","")

set rsqq=server.createobject("adodb.recordset")
Sqlqq="select * from 74hu_admin where sid='"&sid&"'"
rsqq.open Sqlqq,conn,1,3
if NOT rsqq.eof then
	HU_logintime=rsqq("lastdate")
	'离线检测
	if adminTimeCheck=1 And DateDiff("n",HU_logintime,time_now)>25 then
		response.redirect admin_login
	else
		rsqq("lastdate")=time_now
		rsqq.update()
	end if
else
	response.redirect admin_login
end if

if rsqq("sid")<>sid then
	response.redirect admin_login
end if

'IP异常检测
if adminIpCheck=1 And rsqq("lastip")<>Admin_Ip then
	response.redirect admin_login
end if


Keyid=rsqq("id")
keyuser=rsqq("username")
key=rsqq("key")
keyids=trim(rsqq("classids"))

rsqq.close
set rsqq=nothing

%>